<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<style>
    .tab-tl li {
        list-style: none;
        float: left;
        margin: 10px;
    }
    
    .tab-con {
        clear: both;
        margin: 6%;
    }
    
    .tab-con div {
        margin: 10px;
    }
    
    .tab-tl .active {
        color: #9f0;
        border-bottom: 1px solid #9f0;
    }
</style>

<body>
    <div id="root">
        <div>{{cur | nums}}</div>
        <div>{{cur2 | numbers(3)}}</div>

    </div>
</body>
<script>
    window.onload = function() {
        new Vue({
            el: "#root",
            data: {
                cur: 10,
                cur2: 3.141592635,
                tabletle: ["标题1", "标题2", "标题3"],
                tablecon: ['111', '222', '333']
            },
            filters: {
                nums: (num) => {
                    return num < 10 ? '0' + num : num;
                },
                numbers: (num, n) => {
                    return num.toFixed(n)
                }
            }
        })
    }
</script>

</html>